package com.hubu.mapper;

import com.hubu.domain.*;
import com.hubu.model.ArticulationProduct;
import lombok.Data;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @Author xiedi
 * @Date: 2022/11/5
 */
public interface KnowledgeGraphDao {
    List<KgDomain> getDomains();
    List<KgDomain> getRecommendDomainList();
    List<KgDomain> getDomainList(@Param("domainName")String domainName, @Param("type")Integer type, @Param("commend")Integer commend);
    void saveDomain(KgDomain map);
    void updateDomain(KgDomain map);
    void deleteDomain(@Param("id") Integer id);
    List<KgDomain> getDomainByName(@Param("domainName") String domainName);
    List<KgDomain> getDomainById(@Param("domainId")Integer domainId);
    KgDomain selectById(@Param("domainId")Integer domainId);

    void saveNodeImage(@Param("maplist") List<Map<String, Object>> mapList);
    void saveNodeContent(@Param("params") Map<String, Object> map);
    void updateNodeContent(@Param("params") Map<String, Object> map);
    List<KgNodeDetailFile> getNodeImageList(@Param("domainId") Integer domainId, @Param("nodeId") Integer nodeId);
    List<KgNodeDetail> getNodeContent(@Param("domainId") Integer domainId, @Param("nodeId") Integer nodeId);
    void deleteNodeImage(@Param("domainId") Integer domainId,@Param("nodeId") Integer nodeId);
    List<ArticulationProduct> getArticulationProduct(@Param("name")String name);
    boolean isExistArticulationProduct(@Param("name")String name);
    ArrayList<Stock> selectStock(@Param("page")Integer page, @Param("pageSize")Integer pageSize);
    Integer selectStockCount();
    ArrayList<Etf> selectEtf(@Param("page")Integer page, @Param("pageSize")Integer pageSize);
    Integer selectEtfCount();
    ArrayList<HistoryStock> getHistoryStock(@Param("code") String code);

    ArrayList<HistoryEtf> getHistoryEtf(@Param("code") String code);

    List<Stock> getStock(@Param("code") String code);

    List<Etf> getEtf(String code);
}
